<template>
  <div>
    <div class="recommend-title"><img class="title-img" src="http://img1.qunarzz.com/piao/fusion/1711/89/ebc329f16c55bb02.png" alt="">
      猜你喜欢</div>
    <ul>
      <router-link
        tag="li"
        class="item"
        v-for="item of recommendList"
        :key="item.id"
        :to="'/detail/'+item.id"
      >
        <img class="item-img" :src="item.imgUrl" alt="">
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
          <button class="item-button">查看详情</button>
        </div>
      </router-link>
    </ul>
    <div class="recommend-more"><a href="#">查看更多</a></div>
  </div>
</template>

<script>
    export default {
      name: "HomeRecommend",
      data() {
        return {}
      },
      props: {
        recommendList: Array
      }
    }
</script>

<style lang="stylus" scoped>
  @import "~style/varibles.styl"
  @import "~style/mixins.styl"
  .recommend-more
    height .8rem
    text-align center
    line-height .8rem
  .recommend-title
    line-height:.8rem
    text-indent .3rem
    margin-top:.25rem
    font-size .32rem
    .title-img
      display: inline-block
      width .3rem
      height: .3rem
  .item
    height 2rem
    display: flex
    overflow: hidden
    margin-top .3rem
    margin-left .3rem
    padding-bottom .3rem
    border-bottom 1px solid #eee
    .item-img
      height 2rem
      width 2rem
    .item-info
      padding .2rem
      min-width 0
      .item-title
        font-size .32rem
        height .54rem
        line-height .54rem
        ellipsis()
      .item-desc
        margin-top:.1rem
        line-height:.4rem
        color #666
        ellipsis()
      .item-button
        margin-top:.2rem
        background: #ff9300
        padding 0 .2rem
        border-radius .06px
        color #fff
        line-height .4rem
</style>
